<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>志愿组合管理</title>
	<meta name="decorator" content="default"/>
</head>
<body>
<div class="main-content">
    <tags:breadcrumb menuId="学校管理" />
    <div class="page-content">
    	<div class="search-block" style="display:none;">
			<form:form id="searchForm" modelAttribute="volunteer" action="${ctx}/volunteer/volunteer/" method="post" class="form-horizontal">
			<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
			<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
                <div class="form-group" style="margin-bottom: 0px;">
                    <label class="col-sm-1 no-padding-right control-label">组合名称：</label>
                    <div class="col-sm-2">
                            <form:input path="name" htmlEscape="false" maxlength="64" class="col-sm-8"/>
                    </div>
                </div><hr>
            <input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
		</form:form>
	</div>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>组合名称</th>
				<shiro:hasPermission name="volunteer:volunteer:edit"><th>操作</th></shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="volunteer">
			<tr>
				<td><a href="${ctx}/volunteer/volunteer/form?id=${volunteer.id}">
					${volunteer.name}
				</a></td>
				<shiro:hasPermission name="volunteer:volunteer:edit"><td>
    				<a href="${ctx}/volunteer/volunteer/form?id=${volunteer.id}">修改</a>
					<a href="${ctx}/volunteer/volunteer/delete?id=${volunteer.id}" onclick="return confirmx('确认要删除该志愿组合吗？', this.href)">删除</a>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
    </div>
</div>
<script type="text/javascript">
	$(document).ready(function() {
        //显示高级查询
        $(".search_link").click(function(){
            if($(".search-block").is(":visible")){
                $(".search-block").hide();
                $(".search_link").text("高级查询");
            }else{
                $(".search-block").show();
                $(".search_link").text("隐藏查询");
            }
        });
	});
	function page(n,s){
		$("#pageNo").val(n);
		$("#pageSize").val(s);
		$("#searchForm").submit();
		return false;
	}
</script>
</body>
</html>